using System;
using System.Collections.Generic;
using System.Text;
using QLKS.HeThongBUS;
using QLKS.HeThongDAO;
using System.Data;

namespace QLKS.HeThongBUS
{
    public enum NV_BUSResult
    {
        OK,
        DAOERROR,
    }

    
    public class NV_BUS
    {
        //select all NV
        public static DataTable DSNV()
        {
            return NV_DAO.SelectAllNV();
        }

        //Them NV

        public static NV_BUSResult ThemNV(NV_DTO nv)
        {
            if (!NV_DAO.InsertNV(nv))
                return NV_BUSResult.DAOERROR;
            return NV_BUSResult.OK;
        }


        //Sua NV
        public static NV_BUSResult UpdateNV(NV_DTO nv)
        {
            if (!NV_DAO.UpdateNV(nv))
                return NV_BUSResult.DAOERROR;
            return NV_BUSResult.OK;
        }


        //Xoa NV
        public static NV_BUSResult DeleteNV(NV_DTO nv)
        {
            if (!NV_DAO.DeleteNV(nv))
                return NV_BUSResult.DAOERROR;
            return NV_BUSResult.OK;
        }


        //ds chuc vu

        public static DataTable DSCV()
        {
            return NV_DAO.DSCV();
        }



    }
}
